<template>
  <div>
    <!-- 为了不让微商城底部出现导航栏，故此新建此页面，使用 wx.reLaunch来跳转 -->
  </div>
</template>

<script>
  import {mapGetters, mapActions} from 'vuex'

  export default {
    data() {
      return {
        from: 'index'
      }
    },
    components: {
    },
    computed: {

    },
    methods: {
      goShopCar() {
        if (this.from === 'index') {
          wx.navigateTo({
            url: `/pages/webview?route=${encodeURIComponent('/goods/shoppingCart')}`,
            complete: () => { this.from = 'orther'; },
          })
        } else {
          wx.switchTab({
            url: `/pages/index`,
            complete: () => { this.from = 'index'; },
          })
        }
      }
    },
    // onLoad(options) {
    //   this.goShopCar()
    // },
    onShow(options) {
      this.goShopCar()
    }
  }
</script>

